package com.slz3.business.module.goodsManagement.gooBaseGoodsSpecification.steward;

import com.slz3.business.module.goodsManagement.gooBaseGoodsSpecification.domain.GooBaseGoodsSpecification;
import com.slz3.business.module.goodsManagement.gooBaseGoodsSpecification.domain.GooBaseGoodsSpecificationCondition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

import javax.annotation.Resource;

@Component
public class GooBaseGoodsSpecificationResponse {

    @Autowired
    private GooBaseGoodsSpecificationResController gooBaseGoodsSpecificationResController;

    public  Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsSpecification.class).flatMap(gooBaseGoodsSpecification ->
                gooBaseGoodsSpecificationResController.add(req, gooBaseGoodsSpecification)
        );
    }

    public  Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsSpecificationCondition.class).flatMap(gooBaseGoodsSpecificationCondition ->
                gooBaseGoodsSpecificationResController.delete(req, gooBaseGoodsSpecificationCondition)
        );
    }

    public  Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsSpecification.class).flatMap(gooBaseGoodsSpecification ->
                gooBaseGoodsSpecificationResController.modify(req, gooBaseGoodsSpecification)
        );
    }


    public  Mono<ServerResponse> list(ServerRequest req) {
        return gooBaseGoodsSpecificationResController.list(req);
    }

    public  Mono<ServerResponse> info(ServerRequest req) {
        return gooBaseGoodsSpecificationResController.info(req);
    }

    public  Mono<ServerResponse> choice(ServerRequest req) {
        return gooBaseGoodsSpecificationResController.choice(req);
    }

    public Mono<ServerResponse> findByFkGooBaseGoodsUuid(ServerRequest req){
        return gooBaseGoodsSpecificationResController.findByFkGooBaseGoodsUuid(req);
    }

    public  Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsSpecificationCondition.class).flatMap(gooBaseGoodsSpecificationCondition ->
                gooBaseGoodsSpecificationResController.auditSubmit(req, gooBaseGoodsSpecificationCondition)
        );
    }

    public  Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsSpecificationCondition.class).flatMap(gooBaseGoodsSpecificationCondition ->
                gooBaseGoodsSpecificationResController.audit(req, gooBaseGoodsSpecificationCondition)
        );
    }

    public  Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsSpecificationCondition.class).flatMap(gooBaseGoodsSpecificationCondition ->
                gooBaseGoodsSpecificationResController.auditReject(req, gooBaseGoodsSpecificationCondition)
        );
    }

    public  Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsSpecificationCondition.class).flatMap(gooBaseGoodsSpecificationCondition ->
                gooBaseGoodsSpecificationResController.usingEnable(req, gooBaseGoodsSpecificationCondition)
        );
    }

    public  Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(GooBaseGoodsSpecificationCondition.class).flatMap(gooBaseGoodsSpecificationCondition ->
                gooBaseGoodsSpecificationResController.usingDisable(req, gooBaseGoodsSpecificationCondition)
        );
    }   

}
